package com.fishing.util;

import java.util.ArrayList;
import java.util.List;

public class StringUtil {

    public static List<Long> splitStr(String str){
        String[] split = str.trim().split(",");
        List<Long> gameIds = new ArrayList<>();
        for (String s : split) {
            Long aLong = Long.valueOf(s.trim());
            gameIds.add(aLong);
        }
        return gameIds;
    }

    //根据id获取游戏名
    public static String gameName(Long gameId){
        String gameName = null;
        if (gameId == 1){
            gameName = "捕鱼大厅";
        }else if (gameId == 7){
            gameName = "龙虎斗";
        }else if (gameId == 8){
            gameName = "水果玛丽";
        }else if (gameId == 12){
            gameName = "777";
        }else if (gameId == 17){
            gameName = "僵尸";
        }
        return gameName;
    }

    public static String level(Long roomId){
        String result = null;
        if (roomId == 1){
            result = "初级场";
        }else if (roomId == 2){
            result = "中级场";
        }else if (roomId == 3){
            result =  "高级场";
        }else if (roomId == 4){
            result =  "大师场";
        }
        return result;
    }
}
